#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int F(int x)
{
	int a = 1;
	int b = 1;
	int c = 0;
		while (x >= 3)
		{
			c = a + b;
			a = b;
			b = c;
			x--;
		}
		return b;
	if(x<3)
	{
		return 1;
	}
	
}
int main()
{
	int n = 0;
	scanf("%d", &n);
	int ret = F(n);
	printf("%d\n", ret);
	return 0;
}